import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
export const Layout = () => import("@/layout/index.vue");
export const systemconfigRoutes: RouteRecordRaw =
{
    path: '/systemconfig',
    component: Layout,
    redirect: 'noredirect',
    name: 'SystemConfig',
    meta: {
        title: 'SystemConfig.title',
        icon: 'user',

    },
    children: [
        {
            path: 'users',
            component: () => import('@/views/identity/user/index.vue'),
            name: 'Users',
            meta: { title: 'AbpIdentity.UserManager.title', policy: null, icon: 'user'}
        },
        {
            path: 'roles',
            component: () => import('@/views/identity/role/index.vue'),
            name: 'Roles',
           // meta: { title: 'AbpIdentity.RolerManager.title', policy: 'AbpIdentity.Roles', icon: 'menu' }
            meta: { title: 'AbpIdentity.RolerManager.title',  icon: 'menu' }
        },
        {
            path: 'organizations',
            component: () => import('@/views/identity/organizationunits/index.vue'),
            name: 'Organizations',
            meta: { title: 'AbpIdentity.OrganitaionUnitsrManager.title', policy: 'AbpIdentity.OrganitaionUnits', icon: 'client' }
        },
        {
            path:'settings',
            component:()=>import('@/views/system/setting/index.vue'),
            name: 'Settings',
            meta: { title: 'SettingUi.title', policy: 'SettingUi.ShowSettingPage', icon: 'edit' }
        },
        {
            path:'dictionarys',
            component:()=>import('@/views/system/dictionary/index.vue'),
            name: 'Dictionarys',
            meta: { title: 'Dictionary.title', policy: 'Dictionary.Default', icon: 'dict' }
        },
        {
            path: 'logs',
            component: () => import('@/views/identity/logs/index.vue'),
            name: 'Logs',
            redirect: 'noRedirect',
            meta: { title: 'SystemConfig.Logs.title' ,icon: 'menu'},
            children:[
                {
                    path: 'auditlogs',
                    component: () => import('@/views/identity/logs/auditlog/index.vue'),
                    name: 'AuditLogs',
                    meta: { title: 'AbpIdentity.AuditLogsManager.title', policy: 'AbpAuditLogging.Default' ,icon: 'menu'},
                },
                {
                    path: 'securitylogs',
                    component: () => import('@/views/identity/logs/securitylog/index.vue'),
                    name: 'SecurityLogs',
                    meta: { title: 'AbpIdentity.SecurityLogs.title', policy: 'AbpAuditLogging.Default' ,icon: 'menu'},
                }
            ]
        },
      
    ]
}
